<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        nav
        {
            background-color: #950eff;
            width: 100%;
            height: 50px;
        }
        nav a{
            color: #fffaf1;
            text-decoration:none;
            font-size: 1.3em;
            width: 90px;
            text-align: center;
            display: inline-block;
            line-height: 50px;
        }
        nav a:hover {
            background-color: #5521ff;
        }
    </style>
</head>
<body>
<nav>
    <a href="#">首页</a>
    <a href="#">新闻</a>
    <a href="#">个人</a>
    <a href="#">NBA</a>
</nav>
</body>
</html>